//
//  HJFaceCell.m
//  XWC
//
//  Created by Hello on 2022/10/24.
//

#import "HJFaceCell.h"

 
@implementation HJFaceCell
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if(self){
        [self setupViews];
        [self defaultLayout];
    }
    return self;
}

- (void)setupViews
{
    _face = [[UIImageView alloc] init];
    _face.contentMode = UIViewContentModeScaleAspectFit;
    [self addSubview:_face];
}

- (void)defaultLayout
{
    CGSize size = self.frame.size;
    _face.frame = CGRectMake(0, 0, size.width, size.height);
}

- (void)setData:(HJFaceCellData *)data
{
    _face.image = [UIImage imageNamed:data.name];
    [self defaultLayout];
}
@end
